LFLAG = -L ../RPC/build/release-install-cpp11/lib -lmuduo_net -lmuduo_base -ljsoncpp -lpthread -lctemplate -lmysqlclient	#依赖的库
CFLAG = -I ../RPC/build/release-install-cpp11/include

DFLAG_FILE = -D __FILE_VERSION__						#文件版编译选项
DFLAG_MYSQL = -D __MYSQL_VERSION__						#MySQL版编译选项
DFLAG_RELOAD = -D __RELOAD_DATA__						#重新加载数据，必须和DFLAG_MYSQL一起使用

.PHONY:all
all: oj_server reg_server

oj_server:oj_server.cc
	g++ -o $@ $^ $(LFLAG) $(CFLAG) $(DFLAG_MYSQL)  -std=c++14 -g
reg_server:registry_server.cc
	g++ -o $@ $^ $(CFLAG) $(LFLAG) -std=c++14

.PHONY:clean
clean:
	rm  oj_server reg_server